from scrapy.cmdline import execute

import os
import sys
from time import sleep

if __name__ == '__main__':
    print("ok", os.getpid())
    pid = os.fork()
    if pid > 0:
        sys.exit()

    os.umask(0)
    print("ok 当前", os.getpid())
    execute('scrapy crawl cnblogs'.split(" "))
    pass
